<?php
/**
* Config for Olark Chat Widget module
* 
* @version 1.0
* @author trungdt
* @since Oct 26, 2011
*/

class olarkmodule_config {
	function form($object) {
		if (!defined('SYS_FORMS')) require_once(BASE.'subsystems/forms.php');
		exponent_forms_initialize();

		$form = new form();
		if (!isset($object->id)) {
			$object->user_id = "";
			
		} else {
			
			$form->meta('id',$object->id);
		}

		$form->register('user_id','User ID',new textcontrol($object->user_id,50,false,100,"",true));
				
		$form->register('submit','',new buttongroupcontrol('Save','','Cancel'));
		return $form;
	}

	function update($values,$object) {
		$object->user_id = _ab_safe_html_string($values['user_id']);
		return $object;
	}
}

?>